initial slider function

animation not working yet