added operator< and Phi functions with simple tests