applied response format changes + fixed nullPointer bug