improved the updating feature