- Refine logic