add query creation somewhere else