Full implementation of task set 1