better solution to dynamic content