added some bugs