removes indexof dependancy