add check for ForeignId and Interface