worked a little on rewriting