add smartscan M-n and M-p handling