added spit-json function