wmap implementation
rules basic idea