move Comparable to algorithms package