changed to new scanning