changed lower function