check for invalid numeric arrays
add unit tests