another refactoring for handles