edits to script passing changes to db