homework 2 JS2 task 3&4