minor changes to make template more aligned with online example