added if statement
added if statement