Turned if statement into fancy if statement