added debugging flag