Added generic pool implementation