begin different approach with array
fixed syntax errors in commands called on array