scanner, streams and generic api stuff