Reimplemented 1.37-1.39 exercises