use switch instead of $methodName