simplified some code around src and dest