refine server side