Added nearest API