update based on db