added JSON class and implementation