rewrite double direction