modify move function in slide.js