fixes in explanation function