main tunning