Update wpm to use the new api