add metadata to input, make json keys consistent