more work on render functions