Reordered require and method definition for clarity