moved to switch statement