added indexOfIgnoreCase
optimised using indexOfIgnoreCase

eliminate unnecessary creation of ArrayList objects