updated CHANGELOG
extracted condition to local variable