fixing functional callback