was not using count - 1