avoid using  if(a in b)
move require(...) outside function scope
update package.json