PandaPy version of WA code