got scanner mechanism working