review task reading logic and fixed some verbose code