all except last task
full implementation