added V2 implementation over sws