added code samples for lessond 17,18,21,22,23