Rewrited code