parsing query text string into an object