added Boolean function, updated main code and variables.