service refactoring. static refactoring. removed dependency on npm