sample code for displaying top threads