updates to Python and R kernel API