added calculations of sigmax;
minor changes