add a demo and some small fixes: