added constructors, and encapsulated linked lists