updated to use JSON
removed unused