CHANGED queue to not implicitly increase size
ADDED test for boundary case