added checking for string array