updating database reference