added a function for update progress