algorithmic fixes