did some testing and fixed some bugs.