code restruturing