Using different approach for task submissions
Implemented queue and stack using dynamic memory