nearest() in Part C now works and passes test