refine frontend