modified the template tags for much better clarity