Started on query provider code