removed strange logic