Removed duplicate variables and updated message
Removed duplicate variables