corrected the prinvisitor to print sort and pow correctly