tweaked if statement
working if statement