script works and loads database