added if/else and switch