some modifications to renderer