support pretty => true