fix measure calc problem, add connection type