added final parts of assignment