added traces for debugging