working on debugging functions

working on debugging functions