linear algo stated