fixing bugs and demo