remove nested elses, thanks @timoxley