refactor
refactor ctx_render