templates for neater code