first part of assignment2