Numerical investigations of the early stages of planet formation