The code logic works but I am failing in the requirements.