refactored using node modules
github mac killing me