added Memory class