generic pool class