fix not reusing already calculated pixels and change to use many threads