Added listBetween function