updates
factor out analysis construction