debug working