add another logic for dynamic