refactored external dependencie out of the code