refactored stage40 and stage50 all in stage30 and event reads