some bugs removed