Changes to handle the arrays