added fromHex() and toHex() methods
bugfixes