added JSON funcionality