simplify and only use sync api