added query functions by letter
moved functions to external file
included new file
changed parameter