works on debug