Use pdo for mp distance calculations