using object passed in rather than pid