better structure and JSON input