some functions created in memory class