restored mirror function