implement Queue and stack