Added invert hex function