add pprint method to BaseModel