handle async vs. sync identically