used method chaining instead of two lines of code in the template definition.