starting to have script write to db