version 1, very raw pattuplizer