added dynamic processor function