basic thread control done