update
update
added events, updated code for json rendering