adding direct_addressing to templates.