initliasing leaf pointers to -1

and the same fot index