added code for array handling