fixing Pool class
adding unit test for pools