add queue implementation, it's working now. Main reason of the previous
problem was not dealing with special case when queue is full and last =
first.