restructuring for PW module compatibility and a better name :P