updated main so it is easily callable from repl