added streaming capabillity and implemented a server for debugging