A Model for intelligence