fixed so data could be sent to js and possibly fixed loading issue with nearest... js