Update main.cpp

Add trigger for both source and destination