Added query code and some functions
Merge pull request #5 from VladVin/vlad-vin-branch

Added query code and some functions