Changed scanner logic