connected space calculation