An ab initio study on the mechanism of the ketene-imine cycloaddition reaction