refactored to static method