Adds horizontal scroll function