refactor based on hue