Removed case statement in favor of operators and added block