Working version. Can read from JSONs