added Boolean Function to code