Added methods to get length of list and traverse list