started adding debug output