clean and restructured analysis