Make dao functional