stattionary algo modified