Switch variable recommender to a function instead of a method