made Queue and Node generic