Exercise 1. finished mem_init()