changed logic to use one auto checkbox