test 2 for flickering

test 1 gave better results but did not solve it completely