Updated pkg model to support queries better