Implementation of Queue