remove log, fix indexOf usage (lol)