a sample program to understand threading using handler