added layout scoring from pair frequencies