replaced float with double