changed rewrite model structure and position