added function definitions in REPL