The invention relates to compound of the formula I (I) or a salt thereof, wherein the substituents are as defined in the specification; to its preparation and to medicaments comprising it for traeting diseases connected to tehinhibition of H3 receptor.