rewrite of RW tutorials