window saving prototype complete