adding functional demo; small fixes