Add direction support to shift()