added most of task 1