improvements in slide function