added test to ensure that after adding new element previous one start pointing to it