Added render2 function of @FredBeck