small refactorings for object conditin