fixed some bugs, still have issues