added tableToJson feature