refactoring and preparing for dynamic data