just cleaned up some stuff, next implement McRae's algorithm