refactor some Rendering