a couple of important fixes remain - rolled my own comparison function