update to allow for primary_key to be passed as an option