checker for connection between cities