added some optimization
currently, indexing would appear to work...