replaced for loop and value gets with jq.fully jquery now