refactoring to make @aelgru happy