this is for wp3.6, wp3.5 version is on a branch