added output rewrite rule