finished js exercise 4