rewrite model with async