Added writing and shrinking