added functionality to linkedlists