renamed some things for clarity