scratch pad added and JSON parsing