refining s2w algo still and old version but trying this

Signed-off-by: Cerebro <zarboz@gmail.com>