Updating code for earlier change to use a private method