fastened

Computation is now faster and also minor fixes added