Improvement: add sliding direction (-1 -> backward, 1 -> forward)