add interface and simple implemention for outputing json