rewrite demo a bit