refactor identity