fix non templated version, add globalization