remove lodash dependency and clear some code