cleaned up render and selectAll methods