Implemented basic sliding
(cherry picked from commit dba0839)