analysis routine revised