Added smarter way to render