make top equal to index