added pool system and sql support