updated render method