refactoring scanner / removed old implementation