Got my code wrong- corrected if statement