rewrite index,fix #2