added 'redirect if single' functionality