added method to update