fixed conflict in thread.h
fixed last priority bug, tests pass now
merging...