atomicity for each queue operation
atomicity breaks everything
thread-safety added