changed pool constructor