added fail over for faulty JSON