removed debug print statement since that function works now.