class exercises for dynamic templates