solved but not for negative numbers. laziness and lack of time.