implemented the first iteration and an example