Sample code used for Application Programming Concurrent Lecture