make initDatabase also use helper function to set the version