changed json_decode for php 5.3 compatibility