implemented scanner