move complexity from registerAction