pull pb handler into separate func
copy fixes