added QTypeRepSum and qlookup