finished js part1