discovery refactoring P3