WIP - reimplement pw in callback style