Optimizations for task 01, 03 and 04