Behavioral ecology and the successful integration of function and mechanism