WIP Added query key generation