lead report code refractoring