TEST ONE REWRITTING 2nd ATTEMPT. template priorities queue added