adding basic functionality for livestream. and fixing bugs