some optimizations
refactoring
working with processes and maximum number of processes created is the number of cores in the pc