added if/else to hints 1b