rewrite example code into real looking one