fixed to work with new json format