Latest code with boolean fields added