debugging funcitons