reimplemented old rendering procedure, rendering results mostly untested