semi-complete version
complete version (mini error only in localization)