found some bugs and got them fixed