add run() and tests