added ThreadAPI