fixing homework solution to have marks reference