refactored everything into a Builder class that takes in necessary arguments