Added function to determine the columns of a result