equalization function

written and called