refactored and updated dependencies