Implemented If-Else correctly.