add json elements in the views and controllers