fixed problem in that array was not included but Array#swap! was used in optimize