fix bug and remove comments