added debug mode & decreased the value when the moving mode change