testing
refactored some code esp. case statement