fixed exercise 2, calculates top of stacks correctly now, fixed memcpy