added support for composite primary keys