updated to pass array to exec