implement loading queue