changed server side data to client side json for simplicity