You should be able to just use add(obj) rather than add(index, obj).

Other than that can you please explain your problem as I cannot really see anything wrong with it, although does your...