added simple json handling and console