formatting and changes so that we have valid json