adding image shift function