change access template logic