implemented to JSON method