added json support
output fixes