rewrite problem fixed