added another function in an attempt to understand json