refomed code