reorganise imports and code format