conditional execution of controller action