Update templateWithQueue

development of previous template needs to be tested