Updated Analysis pseudocode