updated function in order to read json configs