added primary_key to output