now, using tools.js as a general-use function library