Added function 'refine()'.