updated with test json and text input