better identity handling