use ruby rewrite all code