Modified answer to boolean