added helper function to hex tools for tutorial