example 12; REPL interface only