Formation of planetesimals in the Solar Nebula