working on unit test, and array sort method