preparing code for auto start