* added classes for pbx, handle json and generate errors