replaced methods with static functions in tests