refactored render_data to use updated API