Added functionality to queueEmpty and queueFull