Array changed to array and more suitable asserts used