fixed final syntax error, added primary key attribute to rid