implemented uart input stream with and without waiting for new character