added scanner functionality