General template; inspired by nikhil garg's template provided in Quora.