Optimization of the heat treatment of Nb3Sn-superconductors