added max_active and max_idle params