Example of code reuse for swapping image.