added apply_mirror()