doing cases without using if else or cond