Added Debug functionality