restructured for clarity