added optional batched rendering