Functionality of the Mind