Restructuring and Re-placing the pool function.