updating database stuff