slight refactoring of recommendation mechanism