renamed renderJSON
added second parameter for renderPartial for ajax