checks for when you can alter variables