rewrite as simulatirator