removed db access from template