added to layout and changed json to javascript