change array indexing to use .val()