Mechanism for heritability of intelligence