change redirect to method call