rewriting images part 1