Added another argument to the slice() function