set src and dist to the main obj