added the 'isSublist' funvtion