linked list template now works with mult types