Funding agreement reached on preschools