Adds implementation for best() function