preliminary renderer code