added pre-rendering