Determine Two Phase

Reduced code and created a bool method