support primary key not in 1st column

updating class to support primary keys not in first column