Added functions for hex conversions