simplify distance calculation in assembly.allmaps