clean code and add indexer implement