added supporting code for compare and profiles