Created a wpm function.