changed some rendering code