removed debug couts and replaced them with appropiate comments