added function to get memory class