changed validity output to boolean values