refactored moladTest to make code more concise