added sliding functionality