refactor picture slider