debug msg for callback funciton & declaration for calculateWhiten