add conditional for dynamic attributes