fixed bug in getCousins() implementation