wrote combineLikeUnits()
fixed combineLikeUnits(). Added format()
Optimised format()