made some changes in parameters, now gives better results with W.