Bret's additional code