typos
refactor analysis too