bugfixing and algorithm detection.