integrated template into directive