added if/else statements