refactored to case statement