refactored out static methods