added bool() function to convert to boolean