Updating Bill's code