reworked to regarde task instead of event flow