finish problem set 2 - COMP301