implementing a queue using sized array