refactor22
finalise analysis