added 8 time loop unrolling
changed loop unrolling from 8 times to 4 times due to drop in speed