adding one line to shift function