pthread rendering works but it is SLOOOOOOOOOOOW