added new callbacks for compare and fixed routes