rename variable to a shorter name
add some comments to reduce NCSS complexity