use overlay properties for a toggle function