Fixed array naming and added unit test case