repl with method def