cleaned up a lot of code, attempted to get the compare function working,
but I couldn't.