cleaned up patch slightly, just pass the method name instead
of calculating it