moved the compare functions to a subfolder