refactored to static methods