REFACTORED: created a class instead of global util methods