implemented mirror()