improved version of simulation за 1 проход