simplified distance calculation code by using google's geometry library