refactoring pred