updting database