Teaching introductory thermal physics through problem based learning