refactor first_run (in progress)