modified if exercise