redesigned code