unit scaling; changed main to REPL