Integration from adosapaco fork