refactoring pred 2