Added Debug function