added check for hex strings beginning with 0x