proc refactoring.