functions aded, adaptive2