added debuggerying statements to main