fixing chart updating problems and implementing PriorityBlockingQueue