refine js