is_compact fix
getting closer to loops control, EOD
works complete working run of the algorithm