api refactoring
execute less work on thread