fixed josh code