implement sameAs handling and performance match