finish first part of assignment 3