Extract methods in condition