implemented a function in obstacle so one can read an obstacle from a text file. Note that function might still have bugs in it. Also added toString() in Pair.