init all code