using for in as index