add util functions and package.json