fix bug and add progress