changing output of opter method to match that of the opter.json file (with the nesting)