first part of assignment 4