deleted innecessary code and added test