changed columns to be max depending on max value