refactoring after changing extkey