add async or sync support