copied the homework I already submitted to edit it freely here