checking distance before get visible sides