reworked flow chart