speedups, better edge case behavior