jtoh is now a function