change to bang method since it modifies array