added 'break' to get out of case loop