separate logic into custom getter method