update form class to handle arrays