added assignment 3. finished a3p1