add getName method with "preConditions"