more changes to pulling from db