avoid code duplicated on adapters