moving checks to templates