added cancel button to scan