tweeking template for stack layout