only check for the JS variable 5 times