fixed problems with cyrillic letters
added some comments, renamed binOut() to toHex()