Added BSWF algorithm