preparing code