Changed implementation to use the built-in hex conversion

A simple pull-request :)