basic circular queue implementation