rewrite refaktorointia