Version for demo with bug corrected