edits to work with DB