render work, but with blinking. need to synchronize threads