moved render to own thread