add import function and fix init controller bug