Missed 2 'then' statements