added additional function to addMemory

when memory is added its takes two points from user resourses