Edited add method and added tail node