use json and refine frontend