new rewrite
fixed diff