refining js