Implemented sample 7