implemented the first exercise