Added multithreaded calculations for S&R