further changes and refinement