add some rendering codes.