this should live in helpers.js