The evolution of massive stars with mass loss