On the origins of behavior: Restoring teleological accounts of behavior