add support for custom pk
add support for custom pk