refactor + prepare