wrap json and fix callback naming