changed ArrayList to Queue to get inside the performance margins