fixed bug in explanation code