fix length
test should check end