work with threads

attempt to organize the work flow, describing the life of an anthill