demo file

and small bug fixes