change the code structure