added json validation