fixed some bugs, running slowly tho