saves checkbox state