changed command to dynamic array