fix bug and add code