use clearer terminology: num_goals instead of max_jx