Refactored to use static functions