changed primary key and made populate a working script