added getNth and override getEnd