it's better to use dynamically allocated vector to avoid copy construction and stack overflow in case of big sizes