still gives the right answer, but more correct considering the problem description