my code gives me the right output, what's wrong?