Add track

Correct functions
Add fun RunQuery