use case statement instead