using list to implement Queue