importing ideas from repl-electric