(#15) - use binarySearch instead of linear search
(#17) - don't store the full key in memory