added if statement