Updated style and modify code