reduces code duplication
fixes a spelling error