refactor well