portings from LHCb