Added json handling