added each method on arrays with tests