adding dependencies for when and lodash