- refactoring and use inline function no if anymore