threadparadigm simple implmentation for the example