use indexes instead of copying endless stuff