impl active and passive thread