using douoble instead of float