Added get nth function