WIP: trying a different method for getting pid