refactored processor implementation