added renderPartial helper function