moved helper functions to util.js