Improved scan api