switch statment modified