linked lists with templates, not working yet