moved database creation call to a run loc