Refactor preparing