add options and pretty printing support