added advanced_slope algorithm