wrapped almond function in closure