code to get unchecked values, handle page reload