refactored raw analyzer